package net.cjw.initsb.service.impl;

import java.util.Date;
import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;

import net.cjw.initsb.common.ServiceResult;
import net.cjw.initsb.common.ServiceResult.ServiceResultMsg;
import net.cjw.initsb.dao.TopicRelationMapper;
import net.cjw.initsb.entity.TopicRelation;
import net.cjw.initsb.service.TopicRelationServiceI;
import net.cjw.initsb.utils.UUIDBuild;

@Service
@Transactional
public class TopicRelationServiceImpl implements TopicRelationServiceI {

	Logger logger = LoggerFactory.getLogger(this.getClass());

	@Autowired
	private TopicRelationMapper topicRelationMapper;

	@Override
	public ServiceResult<TopicRelation> selectOne(TopicRelation entity) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public ServiceResult<Object> selectAll(Integer start, Integer max) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public ServiceResult<String> create(TopicRelation entity) {
		entity.setId(UUIDBuild.createUUId());
		entity.setCreateTime(new Date());
		int i = topicRelationMapper.insert(entity);
		if (i > 0) {
			return ServiceResult.buildSuccess(null);
		}
		return ServiceResult.buildError(ServiceResultMsg.SERVER_ERROR_MSG);
	}

	@Override
	public ServiceResult<String> update(TopicRelation entity) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public ServiceResult<String> delete(TopicRelation entity) {
		// TODO Auto-generated method stub
		return null;
	}

}
